-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Allow inverting --local-partial-types #18377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
Also add it to a bunch of test cases where it is needed
cc436e1 to
4cd99a8
Compare
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
|
|
||
| [case testBoundVoid] | ||
| # flags: --no-strict-optional | ||
| # flags: --no-strict-optional --no-local-partial-types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making --local-partial-types invertible will certainly help which it's adoption. E.g. we could also consider adding it to --strict as a first step before making it the default in 2.0.
I do just wonder what change made the test diffs necessary. Adding add_invertible_flag with default=False shouldn't change anything, does it?
It will probably make sense to enable it for all our tests by default, but in that case the test config should probably be changed in the same PR. E.g. it could be added here.
Lines 128 to 131 in 55d4c17
| options = parse_options(original_program_text, testcase, incremental_step) | |
| options.use_builtins_fixtures = True | |
| options.show_traceback = True | |
--
Feel free to split that up into a different PR if you like though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it wasn't necessary, I was just testing that the PR worked by changing the default locally and proactively added it to test cases where I felt confident it was what we needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, changing default in tests is not a bad idea
Some of this was done in #18377
Also add it to a bunch of test cases where it is needed